//
// Created by 11510 on 2024/7/15.
//

#ifndef DAY77_CALCULATOR2_MAINWINDOW_H
#define DAY77_CALCULATOR2_MAINWINDOW_H

#include <QMainWindow>
#include "Calculator.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow {
Q_OBJECT
public:
    MainWindow(QWidget *parent = nullptr);

    ~MainWindow();

private slots:
    void digit_released();

    void binaryOperator_released();

    /**
     * 清空
     */
    void on_pushButton_clear_released();

    /**
     * 求值
     */
    void on_pushButton_equals_released();


private:
    Ui::MainWindow *ui;
    std::string firstNum;
    std::vector<Node> expression;
};


#endif //DAY77_CALCULATOR2_MAINWINDOW_H
